<?php

namespace common\validate;

class TaskLibrary extends BaseValidate
{
    // 验证规则
    protected $rule = [];


    // Select 验证场景定义
    public function sceneSelect()
    {
        return $this->append('param', 'require')
            ->append('param.filter', 'array')
            ->append('param.page', 'array');
    }

    // Create 验证场景定义
    public function sceneCreate()
    {
        return $this->append('data', 'require|array');
    }

    // Update 验证场景定义
    public function sceneUpdate()
    {
        return $this->append('data', 'require|array');
    }

    // Delete 验证场景定义
    public function sceneDelete()
    {
        return $this->append('param.filter', 'require');
    }

    //获取资产工序任务全生命周期
    public function sceneList()
    {
        return $this->append('param.filter', 'array')
            ->append('param.skip_role_filter', 'in:yes,no');
    }
}
